﻿using EasyClassUI.forms.blog;
using EasyClassUI.forms.group;
using EasyClassUI.forms.me;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EasyClassUI.forms.main
{
    public partial class MainWindow : Form
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void exitButton_Click(object sender, EventArgs e)
        {
            System.Environment.Exit(0);
        }

        private void blogButton_Click(object sender, EventArgs e)
        {
            blogButton.Image = Properties.Resources.blog;
            groupButton.Image = Properties.Resources.groupDim;
            meButton.Image = Properties.Resources.personDim;
            blogUC.blogView = new blogUC();
            displayPanel.Controls.Clear();
            displayPanel.Controls.Add(blogUC.blogView);
        }

        private void groupButton_Click(object sender, EventArgs e)
        {
            blogButton.Image = Properties.Resources.blogDim;
            groupButton.Image = Properties.Resources.group;
            meButton.Image = Properties.Resources.personDim;
            groupUC.groupView = new groupUC();
            displayPanel.Controls.Clear();
            displayPanel.Controls.Add(groupUC.groupView);
        }

        private void meButton_Click(object sender, EventArgs e)
        {
            blogButton.Image = Properties.Resources.blogDim;
            groupButton.Image = Properties.Resources.groupDim;
            meButton.Image = Properties.Resources.person;
            meUC me = new meUC();
            displayPanel.Controls.Clear();
            displayPanel.Controls.Add(me);
        }

        private void MainWindow_Load(object sender, EventArgs e)
        {
            blogButton.Image = Properties.Resources.blogDim;
            groupButton.Image = Properties.Resources.group;
            meButton.Image = Properties.Resources.personDim;
            groupUC.groupView = new groupUC();
            displayPanel.Controls.Add(groupUC.groupView);
        }
    }
}
